<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
  * {
    margin: 0;
    padding: 0;
  }

  .dingdan {
    text-align: center;
    margin: 100px auto;
    width: 600px;
    height: 170px;
    border: 1px solid rgba(221, 221, 221);
    box-shadow: 0px 5px 5px -5px rgba(0, 0, 0, 0.5);
  }

  .dingdan h4 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 10px;
  }

  table {
    border-collapse: collapse;
  }

  .dingdan tr td {
    width: 120px;
    height: 40px;
    border: 2px solid black;
  }
</style>

<body>
  <div class="dingdan">
    <h4>银行卡余额</h4>
    <table>
      <tr>
        <td>银行卡总额</td>
        <td>水费</td>
        <td>电费</td>
        <td>网费</td>
        <td>银行卡余额</td>
      </tr>
      <tr>
        <td class="yhsum">小米手机青春plus</td>
        <td class="water">1999元</td>
        <td class="dian">2</td>
        <td class="wang">3998元</td>
        <td class="yhsheng">赣州市转菜鸟驿站</td>
      </tr>
    </table>
  </div>
  <script>
    let yhsum = prompt('请输入你的银行卡总额')
    let water = prompt('请输入你的水费')
    let dian = prompt('请输入你的带电费')
    let wang = prompt('请输入你的网费')
    const yhsumm = document.querySelector('.yhsum')
    const waterr = document.querySelector('.water')
    const diann = document.querySelector('.dian')
    const wangg = document.querySelector('.wang')
    const shengyu = document.querySelector('.yhsheng')
    let yhshengg = parseInt(yhsum) - parseInt(water) - parseInt(dian) - parseInt(wang)
    yhsumm.innerHTML = `${yhsum}`
    waterr.innerHTML = `${water}`
    diann.innerHTML = `${dian}`
    wangg.innerHTML = `${wang}`
    shengyu.innerHTML = `${yhshengg}`
  </script>
</body>

</html>